package com.cetc.common.validate;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * Created by Administrator on 2018/9/26.
 */
@Constraint(validatedBy = {MoneyTypeValidator.class }) //指定校验器
@Documented
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
public @interface MoneyType {

    String message() default "只能为数值类型（保留两位）";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
